<style>
    input[type="checkbox"],input[type="checkbox"]:focus {
        -webkit-appearance: none;
        height: 12px;
        width: 12px;
        border-radius: 6px;
        vertical-align: middle;
        background: #ffffff;
        margin-top: 0px;
        border: 1px solid rgba(115, 123, 145, 1);
    }
    input[type="checkbox"]:checked {
        background: url('/assets/img/speech-ch.png') no-repeat center top;
        background-size: 100% 100%;
    }

    .checked-l {
        color: rgba(115, 123, 145, 1);
        display: flex;
        flex-direction: row;
        align-items: center;
        height: 23px;
        padding-top: 7px;
    }

    .checked-l input {
        margin-right: 15px;
    }
</style>
<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="row[rules]" value="" />
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Parent')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[pid]', $groupdata, null, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group" style="height: 31px;">
        <label class="control-label col-xs-12 col-sm-2">{:__('代理')}:</label>
        <div class="col-xs-1 col-sm-1 checked-l">
            <input type="checkbox" name="row[agent]" id="keeplogin" value="" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Permission')}:</label>
        <div class="col-xs-12 col-sm-8" style="padding-top:7px;">
            <span class="text-muted"><input type="checkbox" name="" id="checkall" /> <label for="checkall"><small>{:__('Check all')}</small></label></span>
            <span class="text-muted"><input type="checkbox" name="" id="expandall" /> <label for="expandall"><small>{:__('Expand all')}</small></label></span>

            <div id="treeview"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8" style='text-align: center;'>
            <button type="submit" class="btn btn-info btn-embossed disabled" style='margin-right: 10px;padding:3px 12px;'>{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed" style='padding:4px 12px;'>{:__('Reset')}</button>
        </div>
    </div>
</form>
